<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>过渡效果作业三滑块菜单</title>
    <style>
    *{margin: 0;
    padding: 0;}
    .menu{
        position: fixed;
        right: 100px;
        bottom: 100px;
    }
    .menu>li{
        list-style: none;
        width: 50px;
        height: 50px;
        border: 2px solid red;
        position: relative;
        overflow: hidden;
    }
    .show{
        width: 50px;
        height: 50px;
    }
    .click{
        width: 50px;
        height: 50px;
        background-color: yellow;
        position: absolute;
        top: 0px;
        left: 0px;
        transform: rotate(45deg);
        transform-origin: -50px 50px;
        transition: transform 0.5s ;
    }
    .menu>li:hover .click{
        transform:rotate(0deg) ;
    }
    </style>
</head>
<body>
        <ul class="menu">
        <li>
            <p class="show">首页</p>
            <p class="click">首页</p>
        </li>
        <li>
            <p class="show">博客</p>
            <p class="click">博客</p>
        </li>
        <li>
            <p class="show">设置</p>
            <p class="click">设置</p>
        </li>
    </ul>
</body>
</html>